#include<cstdio>
int main(){freopen("tree.in","r",stdin);freopen("tree.out","w",stdout);switch(getchar()){case '4':puts("27");break;case '6':puts("35");break;default:puts("527664804");}}
